package com.bwie.service.impl;

import com.bwie.service.MyService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2025/7/21 20:36
 */

@Service
public class MyServiceImpl implements MyService {


    @Async
    @Override
    public void sendNotification(String message) {
        System.out.println("sendNotification发送通知：" + message);
    }

    @Async
    @Override
    public void sendEmail(String message) {
        System.out.println("sendEmail发送通知：" + message);
        throw new RuntimeException("发送邮件异常");
    }

    @Async
    @Override
    public void sendSms(String message) {
        System.out.println("sendSms发送通知：" + message);

    }
}
